package com.yupi.yupicturebackend.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yupi.yupicturebackend.common.DeleteRequest;
import com.yupi.yupicturebackend.model.dto.picture.PictureEditRequest;
import com.yupi.yupicturebackend.model.dto.space.SpaceAddRequest;
import com.yupi.yupicturebackend.model.dto.space.SpaceEditRequest;
import com.yupi.yupicturebackend.model.dto.space.SpaceQueryRequest;
import com.yupi.yupicturebackend.model.dto.space.SpaceUpdateRequest;
import com.yupi.yupicturebackend.model.entity.Space;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yupi.yupicturebackend.model.entity.User;
import com.yupi.yupicturebackend.model.vo.SpaceVo;
import lombok.Synchronized;

import javax.servlet.http.HttpServletRequest;

/**
* @author MK
* @description 针对表【space(空间)】的数据库操作Service
* @createDate 2024-12-24 12:25:32
*/
public interface SpaceService extends IService<Space> {

    long addSpace(SpaceAddRequest spaceAddRequest, User loginUser);

    boolean updateSpace(SpaceUpdateRequest spaceUpdateRequest, HttpServletRequest httpServletRequest);

    boolean updateSpaceVo(SpaceEditRequest spaceEditRequest, HttpServletRequest httpServletRequest);

    boolean deleteSpace(DeleteRequest deleteRequest, HttpServletRequest request);

    void validSpace(Space space, boolean add);

    QueryWrapper<Space> getQueryWrapper(SpaceQueryRequest spaceQueryRequest);

    Page<SpaceVo> getSpaceVoPage(Page<Space> spacePage, HttpServletRequest request);

    SpaceVo getSpaceVO(Space space);
}
